package gui;

import java.awt.Color;
import java.awt.Font;
import java.awt.event.ActionListener;

import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;

/**
 * 
 * @author chkr1_000 Initiates UserMenu class
 */
public class UserMenu extends JPanel {

	private JLabel lblMenu;
	private JLabel lblThebank;
	private JLabel lblCopyright;
	private JButton btnShowAccounts;
	private JButton btnWithdraw;
	private JButton btnDeposit;
	private JButton btnLogOutUser;

	/**
	 * Creates the layout for UserMenu
	 */
	public UserMenu() {
		setLayout(null);
		setSize(Screen.SIZE);
		setBackground(Screen.COLOR);

		lblMenu = new JLabel(".:Menu:.");
		lblMenu.setForeground(Color.WHITE);
		lblMenu.setFont(new Font("Helvetica", Font.BOLD, 20));
		lblMenu.setBounds(286, 50, 78, 21);
		add(lblMenu);

		lblCopyright = new JLabel("\u00A9 Copyright - All rights reserved");
		lblCopyright.setForeground(Color.WHITE);
		lblCopyright.setFont(new Font("Lucida Grande", Font.PLAIN, 13));
		lblCopyright.setBounds(414, 600, 208, 16);
		add(lblCopyright);

		Icon logo = new ImageIcon(getClass().getResource("190-bank.png"));

		lblThebank = new JLabel("TheBank", logo, SwingConstants.LEFT);
		lblThebank.setForeground(Color.WHITE);
		lblThebank.setFont(new Font("Helvetica", Font.BOLD, 16));
		lblThebank.setBounds(30, 25, 99, 22);
		add(lblThebank);

		btnShowAccounts = new JButton("Show Accounts");
		btnShowAccounts.setBounds(266, 222, 129, 28);
		add(btnShowAccounts);

		btnWithdraw = new JButton("Withdraw cash");
		btnWithdraw.setBounds(266, 305, 129, 28);
		add(btnWithdraw);

		btnDeposit = new JButton("Deposit cash");
		btnDeposit.setBounds(266, 386, 129, 28);
		add(btnDeposit);

		btnLogOutUser = new JButton("Log out");
		btnLogOutUser.setBounds(266, 471, 129, 28);
		add(btnLogOutUser);

	}

	/**
	 * 
	 * @param addActionListener
	 *            (1)
	 */
	public void addActionListener(ActionListener l) {
		btnShowAccounts.addActionListener(l);
		btnWithdraw.addActionListener(l);
		btnDeposit.addActionListener(l);
		btnLogOutUser.addActionListener(l);
	}

	/**
	 * 
	 * @return btnShowAccounts
	 */
	public JButton getBtnShowAccounts() {
		return btnShowAccounts;
	}

	/**
	 * 
	 * @param btnShowAccounts
	 */
	public void setBtnShowAccounts(JButton btnShowAccounts) {
		this.btnShowAccounts = btnShowAccounts;
	}

	/**
	 * 
	 * @return btnWithdraw
	 */
	public JButton getBtnWithdraw() {
		return btnWithdraw;
	}

	/**
	 * 
	 * @param btnWithdraw
	 */
	public void setBtnWithdraw(JButton btnWithdraw) {
		this.btnWithdraw = btnWithdraw;
	}

	/**
	 * 
	 * @return btnDeposit
	 */
	public JButton getBtnDeposit() {
		return btnDeposit;
	}

	/**
	 * 
	 * @param btnDeposit
	 */
	public void setBtnDeposit(JButton btnDeposit) {
		this.btnDeposit = btnDeposit;
	}

	/**
	 * 
	 * @return btnLogOutUser
	 */
	public JButton getBtnLogOutUser() {
		return btnLogOutUser;
	}

	/**
	 * 
	 * @param btnLogOutUser
	 */
	public void setBtnLogOutUser(JButton btnLogOutUser) {
		this.btnLogOutUser = btnLogOutUser;
	}

}
